package com.snackshop.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.snackshop.mapper.UserMapper;
import com.snackshop.pojo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public User getUserByUserPhone(String userPhone){
        QueryWrapper queryWrapper = new QueryWrapper<>().eq("user_phone", userPhone);
        return userMapper.selectOne(queryWrapper);
    }
}
